package com.xialing.framework.biz.context.config;

import com.xialing.framework.biz.context.filter.HeaderUserId2ContextFilter;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

/**
 * @Author: xialing
 * @Date: 2025/9/4 16:40
 */
@AutoConfiguration
public class ContextAutoConfiguration {

    @Bean
    public FilterRegistrationBean<HeaderUserId2ContextFilter>  headerUserId2ContextFilter() {
        HeaderUserId2ContextFilter headerUserId2ContextFilter = new HeaderUserId2ContextFilter();
        FilterRegistrationBean<HeaderUserId2ContextFilter> filterFilterRegistrationBean = new FilterRegistrationBean<>(headerUserId2ContextFilter);
        return filterFilterRegistrationBean;
    }
}
